<p-dialog header="{{title}}" [(visible)]="display" modal="modal" [responsive]="true" [width]="900" [minWidth]="200" (onHide)="closeVisitorEditMask(false)">
  <!--<p-panel header="{{title}}">-->
  <div class="ui-grid ui-grid-responsive ui-grid-pad ui-fluid" style="margin: 10px 0px">
    <form [formGroup]="visitor" class="form-horizontal">
      <div class="ui-grid-row margin-bottom-1vw">
        <div class="ui-grid-col-2"></div>
        <div class="ui-grid-col-4 addr">
          <label for="" >姓名：</label>
          <input class="cursor_not_allowed"
                 type="text" formControlName="name"
                 pInputText *ngIf="state ==='add'" [style.width.%]="70"
          />
          <input class="cursor_not_allowed"
                 type="text" formControlName="name"
                 pInputText [(ngModel)]="currentVisitor.name" *ngIf="state ==='update'" [style.width.%]="70"
          />

        </div>
      </div>
      <!--<div class="ui-grid-row margin-bottom-1vw"
           *ngIf="!visitor.controls['remark1'].untouched && !visitor.controls['remark1'].valid">
        <div class="ui-grid-col-6">
          <div class="ui-message ui-messages-error ui-corner-all"  *ngIf="!visitor.hasError('maxLength','remark1')">
            <i class="fa fa-close"></i>
            不超过100字符
          </div>
        </div>
      </div>-->


      <div class="ui-grid-row margin-bottom-1vw">
        <div class="ui-grid-col-2"></div>
        <div class="ui-grid-col-4 addr">
          <label for="" >性别：</label>
          <p-dropdown [options]="sexs" formControlName="sex" [style]="{'width':'201px'}"></p-dropdown>
          <!--<input class="cursor_not_allowed" formControlName="sex"
                 type="text" pInputText *ngIf="state ==='add'" [style.width.%]="70"
          />-->
          <input class="cursor_not_allowed" formControlName="sex"
                 type="text" pInputText [(ngModel)]="currentVisitor.sex" *ngIf="state ==='update'" [style.width.%]="70"
          />
        </div>
        <div class="ui-grid-col-4 addr">
          <label for="" >民族：</label>
          <input class="cursor_not_allowed" formControlName="nation"
                 type="text" pInputText *ngIf="state ==='add'" [style.width.%]="70"
          />
        </div>
      </div>

      <div class="ui-grid-row margin-bottom-1vw">
        <div class="ui-grid-col-2"></div>
        <div class="ui-grid-col-4 addr">
          <label for="" >出生日期：</label>
          <!--<input class="cursor_not_allowed" formControlName="borthday"
                 type="text" pInputText *ngIf="state ==='add'" [style.width.%]="70"
          />-->
          <p-calendar  [showIcon]="true" [locale]="ch" name="time_start"
                       [styleClass]="'endData'" dateFormat="yy-mm-dd"  dataType="string"
                       [maxDate]="maxDate" formControlName="borthday" [style.width.%]="71">
          </p-calendar>
        </div>
      </div>

      <div class="ui-grid-row margin-bottom-1vw">
        <div class="ui-grid-col-2"></div>
        <div class="ui-grid-col-8 addr">
          <label for="" >住址：</label>
          <input class="cursor_not_allowed" formControlName="homeAddress"
                 type="text" pInputText *ngIf="state ==='add'" [style.width.%]="85"
          />
          <input class="cursor_not_allowed" formControlName="homeAddress"
                 type="text" pInputText [(ngModel)]="currentVisitor.home_address" *ngIf="state ==='update'" [style.width.%]="70"
          />
        </div>
      </div>

      <div class="ui-grid-row margin-bottom-1vw">
        <div class="ui-grid-col-2"></div>
        <div class="ui-grid-col-4 addr">
          <label for="" >身份证号：</label>
          <input class="cursor_not_allowed" formControlName="idNumber"
                 type="text" pInputText *ngIf="state ==='add'" [style.width.%]="70"
          />
          <input class="cursor_not_allowed" formControlName="idNumber"
                 type="text" pInputText [(ngModel)]="currentVisitor.id_number" *ngIf="state ==='update'" [style.width.%]="70"
          />
        </div>
      </div>

      <div class="ui-grid-row margin-bottom-1vw">
        <div class="ui-grid-col-2"></div>
        <div class="ui-grid-col-4 addr">
          <label for="" >签发机关：</label>
          <input class="cursor_not_allowed" formControlName="signOrg"
                 type="text" pInputText *ngIf="state ==='add'" [style.width.%]="70"
          />
        </div>
      </div>

      <div class="ui-grid-row margin-bottom-1vw">
        <div class="ui-grid-col-2"></div>
        <div class="ui-grid-col-8 addr">
          <label for="" >结束时间：</label>
          <p-calendar  [showIcon]="true" [locale]="ch" name="time_start"
                       [styleClass]="'endData'" dateFormat="yy-mm-dd"  dataType="string"
                       [maxDate]="maxDate" [showTime]="true" [style.width.%]="36">
          </p-calendar>
          <label for="" >至：</label>
          <p-calendar  [showIcon]="true" [locale]="ch" name="time_start"
                       [styleClass]="'endData'" dateFormat="yy-mm-dd"  dataType="string"
                       [maxDate]="maxDate" [style.width.%]="36">
          </p-calendar>
        </div>
      </div>

      <div class="ui-grid-row margin-bottom-1vw">
        <div class="ui-grid-col-2"></div>
        <div class="ui-grid-col-8 addr">
          <label for="" >备注：</label>
          <textarea formControlName="remark" *ngIf="state ==='add'" name="remark" pInputTextarea type="text" [style.width.%]="86"></textarea>
          <textarea formControlName="remark" [(ngModel)]="currentVisitor.remark" *ngIf="state ==='update'" name="remark" pInputTextarea type="text" [style.width.%]="86"></textarea>
        </div>
      </div>

      <div class="ui-grid-row margin-bottom-1vw">
        <div class="ui-grid-col-8"></div>
        <div class="ui-grid-col-2 padding-tblr">
          <button pButton type="submit" label="提交" (click)="formSubmit(false)"></button>
          <!--<button pButton type="submit" label="确认" (click)="formSubmit(false)" [disabled]="!person.controls['perName'].valid || !person.controls['pid'].valid || !person.controls['pwd'].valid || !person.controls['mobile'].valid" *ngIf="state ==='add'"></button>
          <button pButton type="submit" label="确认" (click)="formSubmit(false)" [disabled]="!person.controls['perName'].valid || !person.controls['pid'].valid || !person.controls['mobile'].valid" *ngIf="state ==='update'"></button>-->
        </div>
        <div class="ui-grid-col-2 padding-tblr">
          <button pButton type="button" label="取消" (click)="closeVisitorEditMask(false)"></button>
        </div>
      </div>
    </form>
  </div>
  <!--</p-panel>-->
</p-dialog>
